package com.samuel.service.impl;

import com.samuel.dao.OrderDao;
import com.samuel.entities.Order;
import com.samuel.service.OrderService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author a neng huang
 * @since 2021-02-25 10:12
 */
@Service
@Transactional
public class OrderServiceImpl implements OrderService {

    @Resource
    private OrderDao orderDao;

    @Override
    public List<Order> list() {
        return orderDao.list();
    }

    @Override
    public Order getById(String id) {
        return orderDao.getById(id);
    }

    @Override
    public int create(Order order) {
        return orderDao.create(order);
    }
}
